<?php

namespace App\Http\Requests;
/**
 * 必须所有的都要继承 BaseRequest
 * Class TestRequest
 * @package App\Http\Requests
 */
class QuestionTypeRequest extends BaseRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name' => [
                'required',
            ],
            'icon' => [
                'required','my_image_count:4'
            ],
        ];
    }

    public function attributes()
    {
        return [
            'icon'=>'图片',
        ];
    }
}
